package Array;
/*
封装一个节点类
 */
public class Node {
    private Integer data; //封装一个数据 使用int的引用数据类型
    private Node next;  //封装一个下一个节点 类型为Node
    //set and get
    public Integer getData() {
        return data;
    }

    public void setData(Integer data) {
        this.data = data;
    }

    public Node getNext() {
        return next;
    }

    public void setNext(Node next) {
        this.next = next;
    }
    //无参构造
    public Node() {
    }
    //构造器(有参构造)
    public Node(Integer data, Node next) {
        this.data = data;
        this.next = next;
    }
}
